from flask import Flask
from flask_cors import CORS
from app.api import sd, chat, voice, export

app = Flask(__name__)
CORS(app)  # 启用CORS支持

# 注册路由
app.register_blueprint(sd.bp, url_prefix='/api')
app.register_blueprint(chat.bp, url_prefix='/api')
app.register_blueprint(voice.bp, url_prefix='/api/voice')
app.register_blueprint(export.bp, url_prefix='/api/export')

if __name__ == '__main__':
    app.run(debug=True) 